package cn.exrick.xboot.common.utils.jiuqi.utils.socketXTB.monitor.server;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * 继承Application接口后项目启动时会按照执行顺序执行run方法
 * 通过设置Order的value来指定执行的顺序
 */
@Component
//@Order(value = 1)
@Slf4j
public class StartService implements ApplicationRunner {
    @Value("${AdminIntercept.flag}")
    private Boolean flag;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        //System.out.println(""+flag);
        //System.out.println(new Date());
        //log.info("开始检测客户端是否在线...");
        //todo 开启三方对接服务监控 20200507 njp
        //new ServerHeart().start();
    }
}